from base import dbObject,dbField,dbMapping

class Faction(dbObject):
    table='chrFactions'
    id=dbField('factionID')
    name=dbField('factionName')
#    desc=dbField('description')

class Corp(dbObject):
    table='crpNPCCorporations'
    id=dbField('corporationID')
    faction=dbMapping('factionID','Faction')
    name=dbMapping('corporationID','dbName')
#    desc=dbField('description')


class Division(dbObject):
    table='crpNPCDivisions'
    id=dbField('divisionID')
    name=dbField('divisionName')
#    desc=dbField('description')

class Agent(dbObject):
    table='agtAgents'
    id=dbField('agentID')
    name=dbMapping('agentID','dbName')
    division=dbMapping('divisionID','Division')
    corp=dbMapping('corporationID','Corp')
#    location=dbMapping('locationID','Location')
    lvl=dbField('level')
    quality=dbField('quality')
    kind=dbMapping('agentTypeID','AgentType')

class AgentType(dbObject):
    table='agtAgentTypes'
    id=dbField('agentTypeID')
    name=dbField('agentType')

class Location(dbObject):
    table='mapDenormalize'
    id=dbField('itemID')
    name=dbField('itemName')
    system=dbMapping('solarSystemID','SolarSys')

class Station(dbObject):
    table='staStations'
    id=dbField('stationID')
    system=dbMapping('solarSystemID','SolarSys')
    name=dbField('stationName')
